/**
 * Created by XianTao on 2016/7/15
 * <p/>
 * Copyright (c) 2015-2015
 * Apache License
 * Version 2.0, January 2004
 * http://www.apache.org/licenses/
 */
package org.smartspring.data.dictionary.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.smartspring.jpa.base.entity.UUIDEntity;

import javax.persistence.*;
import java.util.List;

@Entity
@Table(name = "sys_dictionary")
@Data
@EqualsAndHashCode(callSuper = true)
public class Dictionary extends UUIDEntity{
    private String content;
    private String description;
    @Column(name = "c_sort")
    private Integer sort;
    @ManyToOne
    @JoinColumn(name = "parent_id")
    private Dictionary parent;
    @OneToMany(mappedBy = "parent")
    private List<Dictionary> children;
}
